@extends('admin.layouts.layout')
@section('content')
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-title">
                <h5>添加服务器</h5>
            </div>
            <div class="ibox-content">
                <a class="menuid btn btn-primary btn-sm" href="{{getBackUrl()}}">返回</a>
                <div class="hr-line-dashed m-t-sm m-b-sm"></div>
                <form class="form-horizontal m-t-md" action="{{ route('servers.store') }}" method="post"
                      accept-charset="UTF-8" enctype="multipart/form-data">
                    {!! csrf_field() !!}
                    <input type="hidden" name="goBackUrl" value="{{getBackUrl()}}"/>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">游戏：</label>
                        <div class="input-group col-sm-10">
                            <table class="table-striped table-bordered table-hover table-condensed">
                                <tr class="b-group">
                                    <td class="b-child">
                                        <div style="max-height:10rem;overflow-y:scroll;">
                                            @include('widget.game_radio')
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">渠道：</label>
                        <div class="input-group col-sm-10">
                            <table class="table-striped table-bordered table-hover table-condensed">
                                <tr class="b-group">
                                    <td class="b-child">
                                        <div style="max-height:10rem;overflow-y:scroll;">
                                            @include('widget.channel_radio_all')
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">子渠道Id：</label>
                        <div class="input-group col-sm-2">
                            <input type="text" class="form-control" name="sub_channel_id" value="{{old('sub_channel_id')}}" data-msg-required="请输入子渠道ID">
                            @if ($errors->has('sub_channel_id'))
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i><code>{{$errors->first('sub_channel_id')}}</code></span>
                            @endif
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">服务器Id：</label>
                        <div class="input-group col-sm-2">
                            <input type="text" class="form-control" name="server_id" value="{{old('server_id')}}"
                                   required data-msg-required="请输入渠道ID">
                            @if ($errors->has('server_id'))
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i><code>{{$errors->first('server_id')}}</code></span>
                            @endif
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">服务器名称：</label>
                        <div class="input-group col-sm-2">
                            <input type="text" class="form-control" name="server_name" value="{{old('server_name')}}"
                                   required data-msg-required="请输入渠道名称">
                            @if ($errors->has('server_name'))
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('server_name')}}</span>
                            @endif
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <div class="col-sm-12 col-sm-offset-2">
                            <button class="btn btn-primary" type="submit"><i class="fa fa-check"></i>&nbsp;保 存</button>
                            　
                            <button class="btn btn-white" type="reset"><i class="fa fa-repeat"></i> 重 置</button>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </form>
            </div>
        </div>
    </div>
@endsection
@section('js')
    <script src="{{loadEdition('/js/global.js')}}"></script>
@stop